package com.zzy.ecommerce.service.impl;

import com.zzy.ecommerce.dao.TEarnMapper;
import com.zzy.ecommerce.domain.Earn;
import com.zzy.ecommerce.domain.TEarn;
import com.zzy.ecommerce.service.EarnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
@Service
public class EarnServiceImpl implements EarnService {
    @Autowired
    private TEarnMapper tEarnMapper;
    @Override
    public Integer insertOneEarn(TEarn tEarn) {
        return tEarnMapper.insertOneEarn(tEarn);
    }

    @Override
    public List<Earn> selectAllEarn() {
        return tEarnMapper.selectAllEarn();
    }

    @Override
    public Integer deleteOneEarn(Integer id) {
        return tEarnMapper.deleteOneEarn(id);
    }

    @Override
    public Integer deleteAllEarn() {
        return tEarnMapper.deleteAllEarn();
    }
}
